﻿@{
    Layout = "~/Views/Shared/_LayoutFore.cshtml";
    ViewBag.Title = "银行卡添加";
}
@model LY.Entity.U_BankCard
@section style{
}
@section script{
    <script type="text/javascript">
        $(function () {
            //验证初始化 
            $("form").Validform({
                tiptype: 3
            });
            $("#return").click(function (e) {
                location.href = "/Account/BankcardList";
            });
        });

        function OnSuccess(data) {
            if (data.Status == 1) {
                $.dialog.tips(data.Message, 1, 'tips.gif', function () {
                    window.location.href = data.Data;
                });
            } else {
                $.dialog.tips(data.Message);
                return false;
            }
            return false;
        }
    </script>
}
<div class="RightContrent">
    <div style="margin-left: 50px; margin-right: 50px;">
        <div class="u-title">
            <h2>@ViewBag.Title</h2>
        </div>
        <div style="height: 2px; background-color: red;"></div>

        <div class="u-center">
            <div class="u-form-wrap">

                @using (Ajax.BeginForm("SaveBankCard", new AjaxOptions() { OnSuccess = "OnSuccess" }))
                { 
                    @Html.HiddenFor(model => model.Id)
                    <div class="tab-content">
                        <dl>
                            <dt>卡号：</dt>
                            <dd>
                                <input type="text" class="input normal" id="CardNo" name="CardNo"   datatype="BankId"   value="@Model.CardNO"  ajaxurl= "/tools/AdminAjax.ashx?action=validate_BankBangDing"/>
                            </dd>
                        </dl>
                        <dl>
                            <dt>持卡人姓名：</dt>
                            <dd>
                                <input type="text" class="input normal" id="CardName" name="CardName" value="@Model.CardName" datatype="*"  nullmsg="请输入姓名" />
                            </dd>
                        </dl>
                        <dl>
                            <dt>银行：</dt>
                            <dd>@Html.ResourceDropDownList("BankName", "BankCard", "@Model.BankCard", new { @class = "wh80 select" })</dd>
                        </dl>
                        <dl>
                            <dt></dt>
                            <dd>
                                <input type="hidden" value="@ViewBag.sign" id="sign"/>
                                <input type="hidden" value="@Model.Id" id="Id" name="Id"/>
                                <input type="hidden" value="@Model.MemberId" id="MemberID" name="MemberID"/>
                            </dd>
                        </dl>
                        <dl>
                            <dt></dt>
                            <dd>
                                <div class="u-form-page">
                                    <input type="submit" class="btn" value="确定" id="btnBangDing" />
                                    <input type="button" class="btn" value="返回" id="return" />
                                </div>
                            </dd>
                        </dl>

                    </div>
                }

            </div>
        </div>

    </div>
</div>
